第 20步:嗯。现在,游戏很无聊!无论单击哪个图像,用户都将始终获得积分。

  • 让我们添加一个用户不应该点击的宇航员。
  • ,将Add Entry拖入main()调用play_game()上方
  • 然后,在[ ]中,将"fish"更改为"astronaut1"并将0更改为-100
  • 运行并点击控制台。您应该会看到我们的字典中添加了"astronaut1"

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)